﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ERP.ERPSystem.RBAC.Dto;
using ERP.Team.RBAC;
using Volo.Abp.Application.Services;

namespace ERP.ERPSystem.RBAC
{
    public interface IRoleServices : IApplicationService
    {
        /// <summary>
        /// 添加角色
        /// </summary>
        /// <param name="roleDto">角色Dto</param>
        /// <returns></returns>
        Task<int> AddRole(RoleDto roleDto);

        /// <summary>
        /// 显示角色
        /// </summary>
        /// <returns></returns>
        Task<List<RoleModel>> GetRole();

        /// <summary>
        /// 根据ID获取角色
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<RoleDto> GetRoleById(int id);

        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="id">主键ID</param>
        /// <returns></returns>
        Task DeleteRole(int id);

        /// <summary>
        /// 修改角色
        /// </summary>
        /// <param name="roleDto">角色Dto</param>
        /// <returns></returns>
        Task<int> UpdateRole(RoleDto roleDto);
        /// <summary>
        /// 角色分配权限
        /// </summary>
        /// <returns></returns>
        Task<int> RolePermission(RolePermissionDTO rolePermissionDTO);
        /// <summary>
        /// 反填角色权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<int>> FantianRolePermission(int id);
    }
}
